import type { InjectionKey } from "vue";
import type { TabbarProps, TabbarItemProps } from "../config";

export interface TabbarContext {
	props:Required<TabbarProps> ;
	addField: (field: TabbarItemContext) => void;
	removeField: (field: TabbarItemContext) => void;
	getChildIndex: (id: string) => number;
	change: (name: string|number) => void;
}

export interface TabbarItemContext {
	id:string,
	updateFromParent(): void;
}

export const tabbarItemContextKey: InjectionKey<TabbarItemContext> = Symbol(
	"ETabbarItemContextKey"
);
export const tabbarContextKey: InjectionKey<TabbarContext> =
	Symbol("ETabbarContextKey");
